#include <RX8010.h>

dateTime dt = {22, 8, 29, 1, 22, 2, 0};
void setup()
{
    Wire.begin();         // join I2C bus (RX8010_ADDRess optional for master)
    Serial.begin(115200); // start serial for output
    Serial.println("******0******");
    //	dateTime time;
    /* time.year=22;
    time.month=8;
    time.date=29;
    time.day=1;
    time.hour=17;
    time.minute=30;
    time.second=0; */
    setTime(dt);
    delay(3000);
    disableFCT();
    setFCTOutput(0);
    setFCTCounter(2, 0b001); // 1 minutes
    enableFCT();
    Serial.println("******1******");
    delay(10000);
    resetRX8010();
    Serial.println("******2******");
    enableFOUT(3, 0);
}
void loop()
{
    dateTime m;
    m = getDateTime();
    Serial.printf("%02d-%02d-%02d %02d:%02d:%02d\n", m.year, m.month, m.date, m.hour, m.minute, m.second);
    //  setFixedCycle();

    delay(1000);
}